#ifndef __LINK_LIST_H
#define __LINK_LIST_H

#include <stdint.h>
#include <stdbool.h>


#define   LIST_OK         1
#define   LIST_ERR        0

typedef struct DOUBLE_LIST_NODE
{
	struct DOUBLE_LIST_NODE *next_node;
	void                    *param;
	struct DOUBLE_LIST_NODE *last_node;
}Double_LinkedList_Node_t;

typedef Double_LinkedList_Node_t* D_LinkNode_Handler;



typedef struct
{
	uint8_t                   list_len;
	uint8_t                   max_len;
	uint8_t                   param_size;
	Double_LinkedList_Node_t* start_node;
	Double_LinkedList_Node_t* end_node;
}Double_LinkedList_t;

typedef Double_LinkedList_t*  DoubleList_Handler;
typedef bool                  LIST_STATE;



DoubleList_Handler Double_LinkedList_Create(uint8_t max_len,uint8_t param_size);
LIST_STATE Add_Double_LinkedList_Node(DoubleList_Handler list,void *param);
void Delete_Double_LinkedList_Node(DoubleList_Handler list);
#endif





